﻿<%@ Page Title="WijzigProfiel"Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="WijzigProfiel.aspx.cs" Inherits="Quaack.WijzigProfiel" %>

<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
    </asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
        Uw profiel:<br />
<br />
        <asp:Label ID="LblNietIngelogd" runat="server" ForeColor="Red"></asp:Label>
        <br />
        <asp:GridView ID="GridView1" OnRowUpdating="Gridview1_RowUpdating" OnRowEditing="GridView1_RowEditing" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" AutoGenerateEditButton="True">
            <Columns>
                <asp:BoundField DataField="password" HeaderText="password" SortExpression="password" />
                <asp:BoundField DataField="profile" HeaderText="profile" SortExpression="profile" />
                <asp:BoundField DataField="email" HeaderText="email" SortExpression="email" />
                <asp:BoundField DataField="mobilenumber" ItemStyle-Wrap="false" HeaderText="mobilenumber" SortExpression="mobilenumber" DataFormatString="&quot;{0:d10}&quot;" HtmlEncode="False" />
                <asp:ImageField AccessibleHeaderText="Avatar" AlternateText="Avatar" DataImageUrlField="avatarlocation" HeaderText="Avatar" NullImageUrl="~/Images/default.jpg" InsertVisible="False" ReadOnly="True">
                    <ControlStyle Width="120px" />
                </asp:ImageField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Quaack %>" SelectCommand="SELECT [username], [password], [profile], [email], [avatarlocation], [mobilenumber] FROM [profile]" UpdateCommand="UPDATE [Profile] SET [password] = @password, [profile] = @profile, [email] = @email, [mobilenumber] = @mobilenumber"></asp:SqlDataSource>
        <asp:Label ID="LblAvatar" runat="server" Text="Upload je nieuwe avatar:" Visible="False"></asp:Label>
        <asp:FileUpload ID="FuUpdateAvatar" runat="server" Width="250px" Visible="False" />
        <br />
        <br />
        <asp:Button ID="BtnVerwijderMijnProfiel" runat="server" OnClick="ClkVerwijderMijnProfiel" Text="Verwijder mijn profiel" Width="250px" />
        <br />
        <asp:Button ID="BtnEigenPagina" runat="server" OnClick="ClkBtnEigenPagina" Text="Ga naar eigen pagina" />
        <br />
        <br />
        <br />
        <asp:DropDownList ID="DDLGebruikers" runat="server" DataSourceID="SqlDataSource2" DataTextField="username" DataValueField="username" Visible="False">
        </asp:DropDownList>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:Quaack %>" SelectCommand="SELECT [username] FROM [profile]"></asp:SqlDataSource>
        <br />
        <br />
        <asp:Button ID="BtnVerwijderProfiel" runat="server" OnClick="ClkBtnVerwijderProfiel" Text="Admin: verwijder profiel" Visible="False" Width="250px" />
        <asp:Button ID="BtnHerstelProfiel" runat="server" OnClick="ClkBtnHerstelProfiel" Text="Admin: herstel profiel" Visible="False" />
        <br />
        </asp:Content>